﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using System.Data;


namespace Control
{
    public class dropDownButton : DevExpress.XtraEditors.DropDownButton
    {
        private System.Windows.Forms.ContextMenuStrip _ContextMenu;
        public System.Windows.Forms.ContextMenuStrip ContextMenuBelow
        {
            get
            {
                return _ContextMenu;
            }
            set
            {
                _ContextMenu = value;
            }
        }

        protected override void OnClick(EventArgs e)
        {
            if (_ContextMenu != null)
            {
                _ContextMenu.Show(this, 1, this.Size.Height);
            }
            base.OnClick(e);
        }
    }
}
